package cn.wolfcode.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.wolfcode.common.annotation.Excel;
import cn.wolfcode.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 客户档案对象 bus_customer
 * 
 * @author dalang
 * @date 2023-11-05
 */
public class Customer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 客户姓名 */
    @Excel(name = "客户姓名")
    private String customerName;

    /** 电话 */
    @Excel(name = "电话")
    private String customerPhone;

    /** 性别 */
    @Excel(name = "性别")
    private String customerSex;

    /** 录入人 */
    @Excel(name = "录入人")
    private String editUser;

    /** 录入时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "录入时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date editTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCustomerName(String customerName) 
    {
        this.customerName = customerName;
    }

    @NotBlank(message = "客户姓名不能为空")
    public String getCustomerName() 
    {
        return customerName;
    }
    public void setCustomerPhone(String customerPhone) 
    {
        this.customerPhone = customerPhone;
    }

    @NotBlank(message = "电话不能为空")
    public String getCustomerPhone() 
    {
        return customerPhone;
    }
    public void setCustomerSex(String customerSex) 
    {
        this.customerSex = customerSex;
    }

    public String getCustomerSex() 
    {
        return customerSex;
    }
    public void setEditUser(String editUser) 
    {
        this.editUser = editUser;
    }

    public String getEditUser() 
    {
        return editUser;
    }
    public void setEditTime(Date editTime) 
    {
        this.editTime = editTime;
    }

    public Date getEditTime() 
    {
        return editTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("customerName", getCustomerName())
            .append("customerPhone", getCustomerPhone())
            .append("customerSex", getCustomerSex())
            .append("editUser", getEditUser())
            .append("editTime", getEditTime())
            .toString();
    }
}
